<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="${ctx}/UiMaker/css/style.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="${ctx}/UiMaker/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/UiMaker/custom/checkForm.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$(".click").click(function() {
			$(".tip").fadeIn(200);
		});

		$(".tiptop a").click(function() {
			$(".tip").fadeOut(200);
		});

		$(".sure").click(function() {
			$(".tip").fadeOut(100);
		});

		$(".cancel").click(function() {
			$(".tip").fadeOut(100);
		});

	});
</script>
</head>
<body>
	<form name="form1" method="post" action="${ctx}/user/multiDel">
		<div class="place">
			<span>位置：</span>
			<ul class="placeul">
				<li><a href="#">首页</a></li>
				<li><a href="#">系统管理</a></li>
				<li><a href="#">用户管理</a></li>
			</ul>
		</div>
		<div class="rightinfo">
			<div class="tools">
				<ul class="toolbar">
					<li class="click"><span> <img
							src="${ctx}/UiMaker/images/t01.png" />
					</span> <a href="${ctx}/user/get"> 添加 </a></li>
					<li><a href="javascript:void(0)" onclick="checkzero('select')">
							<span><img src="${ctx}/UiMaker/images/t03.png" /></span>删除所选
					</a></li>
				</ul>
			</div>
			<table class="tablelist">
				<thead>
					<tr>
						<th><input name="selectAll" type="checkbox" id="selectAll"
							onclick="checkAll('select')" /></th>
						<th>用户编号</th>
						<th>用户名称</th>
						<th>用户密码</th>
						<th>用户电话</th>
						<th>用户邮件</th>
						<th>用户角色</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${requestScope.pageModel.items}" var="obj">
						<tr>
							<td><input name="select" type="checkbox" value="${obj.id}"
								onclick="unCheckAll('select')" /></td>
							<td>${obj.id }</td>
							<td>${obj.username }</td>
							<td>${obj.password }</td>
							<td>${obj.phone }</td>
							<td>${obj.email }</td>
							<td>${obj.role.rolename }</td>
							<td><a href="${ctx}/user/get?id=${obj.id }"
								class="tablelink">编辑</a> <%-- <a href="${ctx}/user/del?id=${obj.id }" class="tablelink" onclick="return confirm('确定要删除记录   ${obj.id }  吗？');"> 删除</a> --%>
								<a href="${ctx}/user/del?id=${obj.id }" class="tablelink"
								onclick="javascript:return delcfm()"> 删除</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="pagin">
				<div class="message">
					共<i class="blue">${pageModel.pageCount}</i>页，当前显示第&nbsp;<i
						class="blue">${pageModel.page}&nbsp;</i>页
				</div>
				<ul class="paginList">
					<li class="paginItem"><a href="user/getAll?page=1">首页</a></li>
					<c:if test="${pageModel.page>1}">
						<li class="paginItem"><a
							href="user/getAll?page=${pageModel.prev}">上页</a></li>
					</c:if>

					<c:forEach var="pre" items="${pageModel.prevPages }">
						<li class="paginItem"><a href="user/getAll?page=${pre }">${pre}</a></li>
					</c:forEach>
					<li class="paginItem current"><a href="javascript:;">${pageModel.page }</a></li>
					<c:forEach var="next" items="${pageModel.nextPages }">
						<li class="paginItem"><a href="user/getAll?page=${next }">${next}</a></li>
					</c:forEach>

					<c:if test="${pageModel.page<pageModel.last}">
						<li class="paginItem"><a
							href="user/getAll?page=${pageModel.next}">下页</a></li>
					</c:if>
					<li class="paginItem"><a
						href="user/getAll?page=${pageModel.last}">尾页</a></li>
				</ul>
			</div>
			<div class="tip">
				<div class="tiptop">
					<span>提示信息</span><a></a>
				</div>
				<div class="tipinfo">
					<span><img src="${ctx}/UiMaker/images/ticon.png" /></span>
					<div class="tipright">
						姓名：<input type="text" />
						<p>是否确认对信息的修改 ？</p>
						<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
					</div>
				</div>
				<div class="tipbtn">
					<input name="" type="button" class="sure" value="确定" /> &nbsp; <input
						name="" type="button" class="cancel" value="取消" />
				</div>
			</div>
		</div>
	</form>
	<script type="text/javascript">
		$('.tablelist tbody tr:odd').addClass('odd');
	</script>
</body>
</html>